Integrand size = 12, antiderivative size = 107 \[ \int (a+b \csc (c+d x))^4 \, dx=a^4 x-\frac {2 a b \left (2 a^2+b^2\right ) \text {arctanh}(\cos (c+d x))}{d}-\frac {b^2 \left (17 a^2+2 b^2\right ) \cot (c+d x)}{3 d}-\frac {4 a b^3 \cot (c+d x) \csc (c+d x)}{3 d}-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))^2}{3 d} \]
a^4*x-2*a*b*(2*a^2+b^2)*arctanh(cos(d*x+c))/d-1/3*b^2*(17*a^2+2*b^2)*cot(d *x+c)/d-4/3*a*b^3*cot(d*x+c)*csc(d*x+c)/d-1/3*b^2*cot(d*x+c)*(a+b*csc(d*x+ c))^2/d
Leaf count is larger than twice the leaf count of optimal. \(568\) vs. \(2(107)=214\).
Time = 12.92 (sec) , antiderivative size = 568, normalized size of antiderivative = 5.31 \[ \int (a+b \csc (c+d x))^4 \, dx=\frac {a^4 (c+d x) (a+b \csc (c+d x))^4 \sin ^4(c+d x)}{d (b+a \sin (c+d x))^4}+\frac {\left (-9 a^2 b^2 \cos \left (\frac {1}{2} (c+d x)\right )-b^4 \cos \left (\frac {1}{2} (c+d x)\right )\right ) \csc \left (\frac {1}{2} (c+d x)\right ) (a+b \csc (c+d x))^4 \sin ^4(c+d x)}{3 d (b+a \sin (c+d x))^4}-\frac {a b^3 \csc ^2\left (\frac {1}{2} (c+d x)\right ) (a+b \csc (c+d x))^4 \sin ^4(c+d x)}{2 d (b+a \sin (c+d x))^4}-\frac {b^4 \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right ) (a+b \csc (c+d x))^4 \sin ^4(c+d x)}{24 d (b+a \sin (c+d x))^4}-\frac {2 \left (2 a^3 b+a b^3\right ) (a+b \csc (c+d x))^4 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \sin ^4(c+d x)}{d (b+a \sin (c+d x))^4}+\frac {2 \left (2 a^3 b+a b^3\right ) (a+b \csc (c+d x))^4 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin ^4(c+d x)}{d (b+a \sin (c+d x))^4}+\frac {a b^3 (a+b \csc (c+d x))^4 \sec ^2\left (\frac {1}{2} (c+d x)\right ) \sin ^4(c+d x)}{2 d (b+a \sin (c+d x))^4}+\frac {(a+b \csc (c+d x))^4 \sec \left (\frac {1}{2} (c+d x)\right ) \left (9 a^2 b^2 \sin \left (\frac {1}{2} (c+d x)\right )+b^4 \sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin ^4(c+d x)}{3 d (b+a \sin (c+d x))^4}+\frac {b^4 (a+b \csc (c+d x))^4 \sec ^2\left (\frac {1}{2} (c+d x)\right ) \sin ^4(c+d x) \tan \left (\frac {1}{2} (c+d x)\right )}{24 d (b+a \sin (c+d x))^4} \]
(a^4*(c + d*x)*(a + b*Csc[c + d*x])^4*Sin[c + d*x]^4)/(d*(b + a*Sin[c + d* x])^4) + ((-9*a^2*b^2*Cos[(c + d*x)/2] - b^4*Cos[(c + d*x)/2])*Csc[(c + d* x)/2]*(a + b*Csc[c + d*x])^4*Sin[c + d*x]^4)/(3*d*(b + a*Sin[c + d*x])^4) - (a*b^3*Csc[(c + d*x)/2]^2*(a + b*Csc[c + d*x])^4*Sin[c + d*x]^4)/(2*d*(b + a*Sin[c + d*x])^4) - (b^4*Cot[(c + d*x)/2]*Csc[(c + d*x)/2]^2*(a + b*Cs c[c + d*x])^4*Sin[c + d*x]^4)/(24*d*(b + a*Sin[c + d*x])^4) - (2*(2*a^3*b + a*b^3)*(a + b*Csc[c + d*x])^4*Log[Cos[(c + d*x)/2]]*Sin[c + d*x]^4)/(d*( b + a*Sin[c + d*x])^4) + (2*(2*a^3*b + a*b^3)*(a + b*Csc[c + d*x])^4*Log[S in[(c + d*x)/2]]*Sin[c + d*x]^4)/(d*(b + a*Sin[c + d*x])^4) + (a*b^3*(a + b*Csc[c + d*x])^4*Sec[(c + d*x)/2]^2*Sin[c + d*x]^4)/(2*d*(b + a*Sin[c + d *x])^4) + ((a + b*Csc[c + d*x])^4*Sec[(c + d*x)/2]*(9*a^2*b^2*Sin[(c + d*x )/2] + b^4*Sin[(c + d*x)/2])*Sin[c + d*x]^4)/(3*d*(b + a*Sin[c + d*x])^4) + (b^4*(a + b*Csc[c + d*x])^4*Sec[(c + d*x)/2]^2*Sin[c + d*x]^4*Tan[(c + d *x)/2])/(24*d*(b + a*Sin[c + d*x])^4)
Time = 0.40 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.07, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {3042, 4269, 3042, 4536, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \csc (c+d x))^4 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+b \csc (c+d x))^4dx\) |
\(\Big \downarrow \) 4269 |
\(\displaystyle \frac {1}{3} \int (a+b \csc (c+d x)) \left (3 a^3+8 b^2 \csc ^2(c+d x) a+b \left (9 a^2+2 b^2\right ) \csc (c+d x)\right )dx-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \int (a+b \csc (c+d x)) \left (3 a^3+8 b^2 \csc (c+d x)^2 a+b \left (9 a^2+2 b^2\right ) \csc (c+d x)\right )dx-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 4536 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \int \left (6 a^4+12 b \left (2 a^2+b^2\right ) \csc (c+d x) a+2 b^2 \left (17 a^2+2 b^2\right ) \csc ^2(c+d x)\right )dx-\frac {4 a b^3 \cot (c+d x) \csc (c+d x)}{d}\right )-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \left (6 a^4 x-\frac {12 a b \left (2 a^2+b^2\right ) \text {arctanh}(\cos (c+d x))}{d}-\frac {2 b^2 \left (17 a^2+2 b^2\right ) \cot (c+d x)}{d}\right )-\frac {4 a b^3 \cot (c+d x) \csc (c+d x)}{d}\right )-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))^2}{3 d}\) |
-1/3*(b^2*Cot[c + d*x]*(a + b*Csc[c + d*x])^2)/d + ((6*a^4*x - (12*a*b*(2* a^2 + b^2)*ArcTanh[Cos[c + d*x]])/d - (2*b^2*(17*a^2 + 2*b^2)*Cot[c + d*x] )/d)/2 - (4*a*b^3*Cot[c + d*x]*Csc[c + d*x])/d)/3
3.1.36.3.1 Defintions of rubi rules used
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Simp[(-b^2)*C ot[c + d*x]*((a + b*Csc[c + d*x])^(n - 2)/(d*(n - 1))), x] + Simp[1/(n - 1) Int[(a + b*Csc[c + d*x])^(n - 3)*Simp[a^3*(n - 1) + (b*(b^2*(n - 2) + 3* a^2*(n - 1)))*Csc[c + d*x] + (a*b^2*(3*n - 4))*Csc[c + d*x]^2, x], x], x] / ; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[n, 2] && IntegerQ[2*n]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[(-b)*C*Csc[e + f*x]*(Cot[e + f*x]/(2*f)), x] + Simp[1/2 Int[Simp[2*A*a + (2*B*a + b*(2* A + C))*Csc[e + f*x] + 2*(a*C + B*b)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a , b, e, f, A, B, C}, x]
Time = 1.20 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.05
method | result | size |
derivativedivides | \(\frac {a^{4} \left (d x +c \right )+4 a^{3} b \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )-6 a^{2} b^{2} \cot \left (d x +c \right )+4 a \,b^{3} \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )+b^{4} \left (-\frac {2}{3}-\frac {\csc \left (d x +c \right )^{2}}{3}\right ) \cot \left (d x +c \right )}{d}\) | \(112\) |
default | \(\frac {a^{4} \left (d x +c \right )+4 a^{3} b \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )-6 a^{2} b^{2} \cot \left (d x +c \right )+4 a \,b^{3} \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )+b^{4} \left (-\frac {2}{3}-\frac {\csc \left (d x +c \right )^{2}}{3}\right ) \cot \left (d x +c \right )}{d}\) | \(112\) |
parts | \(a^{4} x +\frac {b^{4} \left (-\frac {2}{3}-\frac {\csc \left (d x +c \right )^{2}}{3}\right ) \cot \left (d x +c \right )}{d}-\frac {2 a \,b^{3} \cot \left (d x +c \right ) \csc \left (d x +c \right )}{d}+\frac {2 a \,b^{3} \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{d}-\frac {6 a^{2} b^{2} \cot \left (d x +c \right )}{d}-\frac {4 a^{3} b \ln \left (\csc \left (d x +c \right )+\cot \left (d x +c \right )\right )}{d}\) | \(118\) |
parallelrisch | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} b^{4}-\cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} b^{4}+12 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a \,b^{3}-12 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a \,b^{3}+24 a^{4} x d +72 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{2} b^{2}+9 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b^{4}-72 \cot \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{2} b^{2}-9 \cot \left (\frac {d x}{2}+\frac {c}{2}\right ) b^{4}+96 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3} b +48 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{3}}{24 d}\) | \(173\) |
norman | \(\frac {a^{4} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-\frac {b^{4}}{24 d}+\frac {b^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{24 d}-\frac {a \,b^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d}+\frac {a \,b^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{2 d}-\frac {3 b^{2} \left (8 a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{8 d}+\frac {3 b^{2} \left (8 a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{8 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}+\frac {2 a b \left (2 a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(178\) |
risch | \(a^{4} x +\frac {4 b^{2} \left (-9 i a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+3 a b \,{\mathrm e}^{5 i \left (d x +c \right )}+18 i a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+3 i b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-9 i a^{2}-i b^{2}-3 a b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}-\frac {4 a^{3} b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}-\frac {2 a \,b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {4 a^{3} b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}+\frac {2 a \,b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}\) | \(196\) |
1/d*(a^4*(d*x+c)+4*a^3*b*ln(-cot(d*x+c)+csc(d*x+c))-6*a^2*b^2*cot(d*x+c)+4 *a*b^3*(-1/2*csc(d*x+c)*cot(d*x+c)+1/2*ln(-cot(d*x+c)+csc(d*x+c)))+b^4*(-2 /3-1/3*csc(d*x+c)^2)*cot(d*x+c))
Leaf count of result is larger than twice the leaf count of optimal. 217 vs. \(2 (101) = 202\).
Time = 0.25 (sec) , antiderivative size = 217, normalized size of antiderivative = 2.03 \[ \int (a+b \csc (c+d x))^4 \, dx=-\frac {2 \, {\left (9 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{3} - 3 \, {\left (2 \, a^{3} b + a b^{3} - {\left (2 \, a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 3 \, {\left (2 \, a^{3} b + a b^{3} - {\left (2 \, a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 3 \, {\left (6 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right ) - 3 \, {\left (a^{4} d x \cos \left (d x + c\right )^{2} - a^{4} d x + 2 \, a b^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{3 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \]
-1/3*(2*(9*a^2*b^2 + b^4)*cos(d*x + c)^3 - 3*(2*a^3*b + a*b^3 - (2*a^3*b + a*b^3)*cos(d*x + c)^2)*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 3*(2*a^ 3*b + a*b^3 - (2*a^3*b + a*b^3)*cos(d*x + c)^2)*log(-1/2*cos(d*x + c) + 1/ 2)*sin(d*x + c) - 3*(6*a^2*b^2 + b^4)*cos(d*x + c) - 3*(a^4*d*x*cos(d*x + c)^2 - a^4*d*x + 2*a*b^3*cos(d*x + c))*sin(d*x + c))/((d*cos(d*x + c)^2 - d)*sin(d*x + c))
\[ \int (a+b \csc (c+d x))^4 \, dx=\int \left (a + b \csc {\left (c + d x \right )}\right )^{4}\, dx \]
Time = 0.22 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.17 \[ \int (a+b \csc (c+d x))^4 \, dx=a^{4} x + \frac {a b^{3} {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{d} - \frac {4 \, a^{3} b \log \left (\cot \left (d x + c\right ) + \csc \left (d x + c\right )\right )}{d} - \frac {6 \, a^{2} b^{2}}{d \tan \left (d x + c\right )} - \frac {{\left (3 \, \tan \left (d x + c\right )^{2} + 1\right )} b^{4}}{3 \, d \tan \left (d x + c\right )^{3}} \]
a^4*x + a*b^3*(2*cos(d*x + c)/(cos(d*x + c)^2 - 1) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1))/d - 4*a^3*b*log(cot(d*x + c) + csc(d*x + c))/d - 6*a^2*b^2/(d*tan(d*x + c)) - 1/3*(3*tan(d*x + c)^2 + 1)*b^4/(d*tan(d*x + c)^3)
Leaf count of result is larger than twice the leaf count of optimal. 205 vs. \(2 (101) = 202\).
Time = 0.29 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.92 \[ \int (a+b \csc (c+d x))^4 \, dx=\frac {b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 24 \, {\left (d x + c\right )} a^{4} + 72 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 9 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 48 \, {\left (2 \, a^{3} b + a b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {176 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 88 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 72 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 9 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b^{4}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}}{24 \, d} \]
1/24*(b^4*tan(1/2*d*x + 1/2*c)^3 + 12*a*b^3*tan(1/2*d*x + 1/2*c)^2 + 24*(d *x + c)*a^4 + 72*a^2*b^2*tan(1/2*d*x + 1/2*c) + 9*b^4*tan(1/2*d*x + 1/2*c) + 48*(2*a^3*b + a*b^3)*log(abs(tan(1/2*d*x + 1/2*c))) - (176*a^3*b*tan(1/ 2*d*x + 1/2*c)^3 + 88*a*b^3*tan(1/2*d*x + 1/2*c)^3 + 72*a^2*b^2*tan(1/2*d* x + 1/2*c)^2 + 9*b^4*tan(1/2*d*x + 1/2*c)^2 + 12*a*b^3*tan(1/2*d*x + 1/2*c ) + b^4)/tan(1/2*d*x + 1/2*c)^3)/d
Time = 18.00 (sec) , antiderivative size = 314, normalized size of antiderivative = 2.93 \[ \int (a+b \csc (c+d x))^4 \, dx=\frac {b^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {b^4\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {3\,b^4\,\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}+\frac {3\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}+\frac {2\,a^4\,\mathrm {atan}\left (\frac {\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3+4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b+2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^3}{-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3+4\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b+2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^3}\right )}{d}+\frac {2\,a\,b^3\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {4\,a^3\,b\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {3\,a^2\,b^2\,\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d}-\frac {a\,b^3\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2\,d}+\frac {3\,a^2\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d}+\frac {a\,b^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2\,d} \]
(b^4*tan(c/2 + (d*x)/2)^3)/(24*d) - (b^4*cot(c/2 + (d*x)/2)^3)/(24*d) - (3 *b^4*cot(c/2 + (d*x)/2))/(8*d) + (3*b^4*tan(c/2 + (d*x)/2))/(8*d) + (2*a^4 *atan((a^3*cos(c/2 + (d*x)/2) + 2*b^3*sin(c/2 + (d*x)/2) + 4*a^2*b*sin(c/2 + (d*x)/2))/(2*b^3*cos(c/2 + (d*x)/2) - a^3*sin(c/2 + (d*x)/2) + 4*a^2*b* cos(c/2 + (d*x)/2))))/d + (2*a*b^3*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/ 2)))/d + (4*a^3*b*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d - (3*a^2*b ^2*cot(c/2 + (d*x)/2))/d - (a*b^3*cot(c/2 + (d*x)/2)^2)/(2*d) + (3*a^2*b^2 *tan(c/2 + (d*x)/2))/d + (a*b^3*tan(c/2 + (d*x)/2)^2)/(2*d)